<template>
  <div class="app-container">
    <div class="filter-container">
      <el-select
        v-model="siteId"
        placeholder="选择网站"
        clearable
        style="width: 200px"
        class="filter-item"
      >
        <el-option
          v-for="item in webSite"
          :key="item.id"
          :label="item.name"
          :value="item.id"
        />
      </el-select>
    </div>
    <div class="editor">
      <el-card>
        <div slot="header">发布文章</div>
        <div id="editor" />
      </el-card>
    </div>
  </div>
</template>

<script>
import E from 'wangeditor'
export default {
  data() {
    return {
      msg: 'hello word',
      webSite: [
        {
          id: 1,
          name: 'www.daruilife.cn'
        },
        {
          id: 2,
          name: 'www.daruilife.com'
        }
      ],
      siteId: ''
    }
  },
  mounted() {
    const editor = new E('#editor')
    editor.create()
  },
  methods: {
    showWebSite() {
      console.log(this.siteId)
    }
  }
}
</script>

<style lang="scss" scoped></style>
